<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>人员信息更改</title>
    <link rel="stylesheet" href="__PUBLIC__/css/person.css">
    <script src="__PUBLIC__/dpa/js/jquery-2.1.4.js"></script>
    <style>
        button{
            margin-left:50px;
            margin-top:50px;
        }
    </style>
</head>
<body>
<!--加载导航条开始-->
<include file="Public/nav"/>
<!--加载导航条结束-->
<div class="right-container">
    <h1>人员信息更改</h1>
    <form action="" method="post">
    <p><label>序号 : </label><input type="text" name="id" value="{$info.id}"></p>
    <p><label>委托单位 : </label>
        <select name="requester" id="re" style="margin-bottom:5px;font-size:16px">
            <option id="option1" value="">请选择委托单位</option>
            <option value="admin">admin</option>
            <foreach name="list" item="v">
                <option value="{$v.requester}" <if condition="$v[requester] eq $info[requester]">selected</if>>{$v.requester}</option>
            </foreach>
        </select>
        </p>
    <p><label>单位编码 : </label><input type="text" name="unitsum" value="{$info.unitsum}"></p>
    <p><label>委托人 : </label><input type="text" name="client" value="{$info.client}"></p>
    <p><label>手机号 : </label><input type="tel" name="tel" id="tel" value="{$info.tel}"></p>
    <p><label>备注 : </label><input type="text" name="remark" value="{$info.remark}"></p>
        <input type="hidden" name="" value="{$info.requester}">
    <p><input type="submit" value="提交"></p>
    </form>
</div>
</body>
<script>
    $(function(){
        var requester = $('input:hidden').val();
        if(requester == 'admin'){
            $('#option1').html(requester);
            $('#option1').val(requester);
        }
    });
    $('form').submit(function(){
        var requester = $('#re').val();
        var tel = $('#tel').val();
        if(requester == ''){
            alert('委托单位不能为空');
            return false;
        }
        if(tel == ''){
            alert('手机号不能为空');
            return false;
        }
    });
</script>
</html>